<?php
/**
 * @file
 * @author  Jakub Kraft <jakub.kraft@gmail.com>
 * @version 1.0
 */

	// inicializace PHP blbosti
	ob_start("ob_gzhandler");
	header('Content-Type: text/plain'); // treba zmenit casem na text/json nebo neco podobneho

	require_once('./lib/oembed.php');
	require_once('./lib/oembed.youtube.php');
	require_once('./lib/oembed.flickr.php');
	require_once('./lib/oembed.deviantart.php');
	
	$oembed = new OEmbed();
	
	$oembed->registerAdapters(array('YoutubeOEmbedAdapter', 'FlickrOEmbedAdapter', 'DeviantArtOEmbedAdapter'));
	$oembed->resolveURL($_GET['url']);
	$json = $oembed->getJSON();
	echo $json;
